<!--
 *
 * @Date: 2022-06-09 19:42:19
 * @LastEditTime: 2022-06-19 20:47:04

-->

<div class="container__style">
  <Navbar [icon]="icon" [rightContent]="rightContent"  (onLeftClick)="onLeftClick()">
    返回
  </Navbar>
  <ng-template #icon>
    <Icon [type]="'left'"></Icon>
  </ng-template>

  <ng-template #rightContent>
    <Icon [type]="'search'" [ngStyle]="{ marginRight: '16px' }"></Icon>
    <Icon [type]="'ellipsis'"></Icon>
  </ng-template>
  <!-- background-color: #409eff; -->
  <!--  登陆-->
  <div class="m-2">
  <div *ngIf="isLogin">
    <div class="h-32 bg-blue-300 logo__style">
      <img src="https://gw.alipayobjects.com/zos/rmsportal/MRhHctKOineMbKAZslML.jpg">
    </div>
    <InputItem [(ngModel)]="userInfo.stuId" [type]="'text'" [clear]="true" [placeholder]="'学号'" [moneyKeyboardAlign]="'left'"
               [content]="'学号:'">
    </InputItem>
    <InputItem [(ngModel)]="userInfo.userGender" [type]="'text'" [clear]="true" [placeholder]="'性别'" [moneyKeyboardAlign]="'left'"
               [content]="'性别:'">
    </InputItem>
    <InputItem [type]="'text'" [(ngModel)]="userInfo.grade" [clear]="true" [placeholder]="'年级'"
               [moneyKeyboardAlign]="'left'"
               [content]="'年级:'">
    </InputItem>
    <InputItem [type]="'text'" [clear]="true" [(ngModel)]="userInfo.major" [placeholder]="'专业'"
               [moneyKeyboardAlign]="'left'"
               [content]="'专业:'">
    </InputItem>
    <InputItem [type]="'text'" [clear]="true" [(ngModel)]="userInfo.college" [placeholder]="'学院'"
               [moneyKeyboardAlign]="'left'" [content]="'学院:'">

    </InputItem>
    <InputItem [type]="'text'" [(ngModel)]="userInfo.educationLevel" [clear]="true" [placeholder]="'学历'" [moneyKeyboardAlign]="'left'"
               [content]="'学历:'">

    </InputItem>
    <InputItem [type]="'text'" [(ngModel)]="userInfo.campus" [clear]="true" [placeholder]="'校区'"
               [moneyKeyboardAlign]="'left'"
               [content]="'校区:'">

    </InputItem>
    <InputItem [type]="'text'" [(ngModel)]="userInfo.dormitory" [clear]="true" [placeholder]="'宿舍楼'"
               [moneyKeyboardAlign]="'left'"
               [content]="'宿舍楼:'">

    </InputItem>
    <InputItem [type]="'text'" [clear]="true" [(ngModel)]="userInfo.roomNum" [placeholder]="'房间号'"
               [moneyKeyboardAlign]="'left'"
               [content]="'房间号:'">

    </InputItem>
    <InputItem [type]="'phone'" [clear]="true" [(ngModel)]="userInfo.phoneNum" [placeholder]="'手机号'"
               [moneyKeyboardAlign]="'left'" [content]="'手机号:'">

    </InputItem>
    <InputItem [type]="'text'" [clear]="true" [(ngModel)]="userInfo.wechatAccount" [placeholder]="'微信号'"
               [moneyKeyboardAlign]="'left'" [content]="'微信号:'">

    </InputItem>
    <InputItem [type]="'number'" [clear]="true" [(ngModel)]="userInfo.qqNum" [placeholder]="'QQ号'"
               [moneyKeyboardAlign]="'left'"
               [content]="'QQ号:'">

    </InputItem>
    <div class="flex flex-row">
      <div class="back__style" style="width:  100%" Button [type]="'primary'"(onClick)="gotoAdvice()">建议</div>
    </div>
    <div class="flex mt-2">
      <div class="flex-1" Button [type]="'primary'" (onClick)="saveUserInfo()">保存</div>
      <div class="flex-1 ml-2" Button [type]="'warning'"(onClick)="lougout()">退出登录</div>

    </div>

  </div>

  <!--  未登录-->
  <div *ngIf="!isLogin">
    <!--去登录按钮+美化-->
    <div class="flex flex-col ">
      <img src="https://zos.alipayobjects.com/rmsportal/PZUUCKTRIHWiZSY.jpeg">
      <div  class="mt-4" Button [type]="'primary'" (onClick)="gotoLogin()">登录</div>

    </div>
  </div>
  </div>
</div>


